package cn.tiger.starter.easyExcel;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import cn.tiger.utils.ExcelUtil;
import com.alibaba.excel.EasyExcelFactory;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.alibaba.excel.metadata.BaseRowModel;
import com.alibaba.excel.metadata.Sheet;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;

/**
 * @Author ： ZAG WELL
 * @Date : 2021/5/5
 */
public class EasyExcelExprot {
    public static void main(String[] args) {
        String filePath = "C:\\Users\\ZAG WELL\\Desktop\\测试导出导出\\easyExcelExport.xlsx";
        List<List<Object>> data = new ArrayList<>();
        data.add(Arrays.asList("111","222","333"));
        data.add(Arrays.asList("111","222","333"));
        data.add(Arrays.asList("111","222","333"));
        List<String> head = Arrays.asList("表头1", "表头2", "表头3");
        ExcelUtil.writeBySimple(filePath,data,head);
    }
}
